import { createRouter, createWebHistory } from 'vue-router';
const TraConsole = () => import('@/views/console/TraConsole.vue');
const Console = () => import('@/views/Console.vue');
const Login = () => import('@/views/Login.vue');

const routes = [
  {
    path: '/',
    redirect: '/traConsole',
  },
  {
    path: '/console',
    name: 'Console',
    component: Console,
    redirect: '/traConsole',
    children: [
      {
        path: '/traConsole',
        name: 'TraConsole',
        component: TraConsole,
      },
    ],
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
